package com.qidian.mes.controller;

import com.qidian.mes.pojo.Feedback;
import com.qidian.mes.service.FeedbackService;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/feedback")
@CrossOrigin
public class FeedbackController {
    @Autowired
    private FeedbackService feedbackService;

    @GetMapping("/list")
    public MESResult list(@RequestParam(defaultValue = "1")int page, @RequestParam(defaultValue = "10") int limit, Feedback feedback){
        return feedbackService.list(page,limit,feedback);
    }
    @DeleteMapping("/delete")
    public MESResult delete(Long recordId){
        return feedbackService.delete(recordId);
    }
}
